import random

score = 0
for i in range(5):
    number1 = random.randint(1, 10)
    number2 = random.randint(1, 10)
    add_sum = int(input('请输入两个数相加结果：'))
    if add_sum == number1 + number2:
        print('正确')
        score += 10
    else:
        print('错误，正确值%d' % (number1 + number2))
        score -= 5
else:
    print('总成绩%d' % score)
